import 'package:flutter/material.dart';
import 'package:flutter_shop/cons/global_cons.dart';
import 'package:flutter_shop/jpush/jpush_msg_data.dart';
import 'package:flutter_shop/pages/home/home_router.dart';
import 'package:flutter_shop/routers/navigator_utils.dart';

///Title:极光推送跳转 <br/>
///Description: <br/>
///author:xiemiao <br/>
///date: 2020-03-02 <br/>
///version 1.0 <br/>
class JpushJumper {
  ///跳转页面
  static void jump(BuildContext context, String routePath, JpushMsgData entity) {
    switch (routePath) {
      case HomeRouter.goodDetail: //商品详情
        NavigatorUtils.push(context, routePath, params: {GlobalCons.KEY_ID: entity.id});
        break;

      default:
        break;
    }
  }
}
